<template>
  <el-container>
    <el-header>
      <header-nav />
    </el-header>
    <el-main>
      <el-tabs type="border-card" v-model="activeName">
        <el-tab-pane label="登录" name="login">
          <login-form />
        </el-tab-pane>
        <el-tab-pane label="注册" name="register">
          <register-form />
        </el-tab-pane>
      </el-tabs>
    </el-main>
    <el-footer>
      <footer-box />
    </el-footer>
  </el-container>
</template>

<script lang="ts" setup>
import FooterBox from '@/components/common/FooterBox.vue'
import HeaderNav from '@/components/common/HeaderNav.vue'
import LoginForm from '@/components/login/LoginForm.vue'
import RegisterForm from '@/components/login/RegisterForm.vue'
import { ref } from 'vue'

const activeName = ref('login')
</script>

<style lang="scss" scoped>
.el-container {
  background-color: #fbfbfd;
  height: 100vh;
  display: unset;

  .el-header {
    padding: 0;
    height: 30px;
    position: fixed;
    top: 0;
    z-index: 2;
    width: 100%;
  }

  .el-main {
    margin-top: 0;
    margin-bottom: 40px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    overflow: unset;

    .el-tabs {
      width: 400px;
      margin: 140px auto;
    }
  }

  .el-footer {
    height: 30px;
    line-height: 30px;
    text-align: center;
    width: 100%;
    position: fixed;
    bottom: 0;
    background-color: #f5f7fa;
    border-top: 1px solid #cecece;
    color: #b1b3b8;
  }
}
</style>
